package com.entity;

import java.util.ArrayList;
import java.util.Date;
import java.util.Iterator;
import java.util.List;

public class DietitianExample {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    private Integer limit;

    private Integer offset;

    public DietitianExample() {
        oredCriteria = new ArrayList<Criteria>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    public void setLimit(Integer limit) {
        this.limit = limit;
    }

    public Integer getLimit() {
        return limit;
    }

    public void setOffset(Integer offset) {
        this.offset = offset;
    }

    public Integer getOffset() {
        return offset;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        protected void addCriterionForJDBCDate(String condition, Date value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            addCriterion(condition, new java.sql.Date(value.getTime()), property);
        }

        protected void addCriterionForJDBCDate(String condition, List<Date> values, String property) {
            if (values == null || values.size() == 0) {
                throw new RuntimeException("Value list for " + property + " cannot be null or empty");
            }
            List<java.sql.Date> dateList = new ArrayList<java.sql.Date>();
            Iterator<Date> iter = values.iterator();
            while (iter.hasNext()) {
                dateList.add(new java.sql.Date(iter.next().getTime()));
            }
            addCriterion(condition, dateList, property);
        }

        protected void addCriterionForJDBCDate(String condition, Date value1, Date value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            addCriterion(condition, new java.sql.Date(value1.getTime()), new java.sql.Date(value2.getTime()), property);
        }

        public Criteria andDidIsNull() {
            addCriterion("DID is null");
            return (Criteria) this;
        }

        public Criteria andDidIsNotNull() {
            addCriterion("DID is not null");
            return (Criteria) this;
        }

        public Criteria andDidEqualTo(String value) {
            addCriterion("DID =", value, "did");
            return (Criteria) this;
        }

        public Criteria andDidNotEqualTo(String value) {
            addCriterion("DID <>", value, "did");
            return (Criteria) this;
        }

        public Criteria andDidGreaterThan(String value) {
            addCriterion("DID >", value, "did");
            return (Criteria) this;
        }

        public Criteria andDidGreaterThanOrEqualTo(String value) {
            addCriterion("DID >=", value, "did");
            return (Criteria) this;
        }

        public Criteria andDidLessThan(String value) {
            addCriterion("DID <", value, "did");
            return (Criteria) this;
        }

        public Criteria andDidLessThanOrEqualTo(String value) {
            addCriterion("DID <=", value, "did");
            return (Criteria) this;
        }

        public Criteria andDidLike(String value) {
            addCriterion("DID like", value, "did");
            return (Criteria) this;
        }

        public Criteria andDidNotLike(String value) {
            addCriterion("DID not like", value, "did");
            return (Criteria) this;
        }

        public Criteria andDidIn(List<String> values) {
            addCriterion("DID in", values, "did");
            return (Criteria) this;
        }

        public Criteria andDidNotIn(List<String> values) {
            addCriterion("DID not in", values, "did");
            return (Criteria) this;
        }

        public Criteria andDidBetween(String value1, String value2) {
            addCriterion("DID between", value1, value2, "did");
            return (Criteria) this;
        }

        public Criteria andDidNotBetween(String value1, String value2) {
            addCriterion("DID not between", value1, value2, "did");
            return (Criteria) this;
        }

        public Criteria andLtidIsNull() {
            addCriterion("LTID is null");
            return (Criteria) this;
        }

        public Criteria andLtidIsNotNull() {
            addCriterion("LTID is not null");
            return (Criteria) this;
        }

        public Criteria andLtidEqualTo(String value) {
            addCriterion("LTID =", value, "ltid");
            return (Criteria) this;
        }

        public Criteria andLtidNotEqualTo(String value) {
            addCriterion("LTID <>", value, "ltid");
            return (Criteria) this;
        }

        public Criteria andLtidGreaterThan(String value) {
            addCriterion("LTID >", value, "ltid");
            return (Criteria) this;
        }

        public Criteria andLtidGreaterThanOrEqualTo(String value) {
            addCriterion("LTID >=", value, "ltid");
            return (Criteria) this;
        }

        public Criteria andLtidLessThan(String value) {
            addCriterion("LTID <", value, "ltid");
            return (Criteria) this;
        }

        public Criteria andLtidLessThanOrEqualTo(String value) {
            addCriterion("LTID <=", value, "ltid");
            return (Criteria) this;
        }

        public Criteria andLtidLike(String value) {
            addCriterion("LTID like", value, "ltid");
            return (Criteria) this;
        }

        public Criteria andLtidNotLike(String value) {
            addCriterion("LTID not like", value, "ltid");
            return (Criteria) this;
        }

        public Criteria andLtidIn(List<String> values) {
            addCriterion("LTID in", values, "ltid");
            return (Criteria) this;
        }

        public Criteria andLtidNotIn(List<String> values) {
            addCriterion("LTID not in", values, "ltid");
            return (Criteria) this;
        }

        public Criteria andLtidBetween(String value1, String value2) {
            addCriterion("LTID between", value1, value2, "ltid");
            return (Criteria) this;
        }

        public Criteria andLtidNotBetween(String value1, String value2) {
            addCriterion("LTID not between", value1, value2, "ltid");
            return (Criteria) this;
        }

        public Criteria andDnameIsNull() {
            addCriterion("DNAME is null");
            return (Criteria) this;
        }

        public Criteria andDnameIsNotNull() {
            addCriterion("DNAME is not null");
            return (Criteria) this;
        }

        public Criteria andDnameEqualTo(String value) {
            addCriterion("DNAME =", value, "dname");
            return (Criteria) this;
        }

        public Criteria andDnameNotEqualTo(String value) {
            addCriterion("DNAME <>", value, "dname");
            return (Criteria) this;
        }

        public Criteria andDnameGreaterThan(String value) {
            addCriterion("DNAME >", value, "dname");
            return (Criteria) this;
        }

        public Criteria andDnameGreaterThanOrEqualTo(String value) {
            addCriterion("DNAME >=", value, "dname");
            return (Criteria) this;
        }

        public Criteria andDnameLessThan(String value) {
            addCriterion("DNAME <", value, "dname");
            return (Criteria) this;
        }

        public Criteria andDnameLessThanOrEqualTo(String value) {
            addCriterion("DNAME <=", value, "dname");
            return (Criteria) this;
        }

        public Criteria andDnameLike(String value) {
            addCriterion("DNAME like", value, "dname");
            return (Criteria) this;
        }

        public Criteria andDnameNotLike(String value) {
            addCriterion("DNAME not like", value, "dname");
            return (Criteria) this;
        }

        public Criteria andDnameIn(List<String> values) {
            addCriterion("DNAME in", values, "dname");
            return (Criteria) this;
        }

        public Criteria andDnameNotIn(List<String> values) {
            addCriterion("DNAME not in", values, "dname");
            return (Criteria) this;
        }

        public Criteria andDnameBetween(String value1, String value2) {
            addCriterion("DNAME between", value1, value2, "dname");
            return (Criteria) this;
        }

        public Criteria andDnameNotBetween(String value1, String value2) {
            addCriterion("DNAME not between", value1, value2, "dname");
            return (Criteria) this;
        }

        public Criteria andDsexIsNull() {
            addCriterion("DSEX is null");
            return (Criteria) this;
        }

        public Criteria andDsexIsNotNull() {
            addCriterion("DSEX is not null");
            return (Criteria) this;
        }

        public Criteria andDsexEqualTo(String value) {
            addCriterion("DSEX =", value, "dsex");
            return (Criteria) this;
        }

        public Criteria andDsexNotEqualTo(String value) {
            addCriterion("DSEX <>", value, "dsex");
            return (Criteria) this;
        }

        public Criteria andDsexGreaterThan(String value) {
            addCriterion("DSEX >", value, "dsex");
            return (Criteria) this;
        }

        public Criteria andDsexGreaterThanOrEqualTo(String value) {
            addCriterion("DSEX >=", value, "dsex");
            return (Criteria) this;
        }

        public Criteria andDsexLessThan(String value) {
            addCriterion("DSEX <", value, "dsex");
            return (Criteria) this;
        }

        public Criteria andDsexLessThanOrEqualTo(String value) {
            addCriterion("DSEX <=", value, "dsex");
            return (Criteria) this;
        }

        public Criteria andDsexLike(String value) {
            addCriterion("DSEX like", value, "dsex");
            return (Criteria) this;
        }

        public Criteria andDsexNotLike(String value) {
            addCriterion("DSEX not like", value, "dsex");
            return (Criteria) this;
        }

        public Criteria andDsexIn(List<String> values) {
            addCriterion("DSEX in", values, "dsex");
            return (Criteria) this;
        }

        public Criteria andDsexNotIn(List<String> values) {
            addCriterion("DSEX not in", values, "dsex");
            return (Criteria) this;
        }

        public Criteria andDsexBetween(String value1, String value2) {
            addCriterion("DSEX between", value1, value2, "dsex");
            return (Criteria) this;
        }

        public Criteria andDsexNotBetween(String value1, String value2) {
            addCriterion("DSEX not between", value1, value2, "dsex");
            return (Criteria) this;
        }

        public Criteria andDbirthdayIsNull() {
            addCriterion("DBIRTHDAY is null");
            return (Criteria) this;
        }

        public Criteria andDbirthdayIsNotNull() {
            addCriterion("DBIRTHDAY is not null");
            return (Criteria) this;
        }

        public Criteria andDbirthdayEqualTo(Date value) {
            addCriterionForJDBCDate("DBIRTHDAY =", value, "dbirthday");
            return (Criteria) this;
        }

        public Criteria andDbirthdayNotEqualTo(Date value) {
            addCriterionForJDBCDate("DBIRTHDAY <>", value, "dbirthday");
            return (Criteria) this;
        }

        public Criteria andDbirthdayGreaterThan(Date value) {
            addCriterionForJDBCDate("DBIRTHDAY >", value, "dbirthday");
            return (Criteria) this;
        }

        public Criteria andDbirthdayGreaterThanOrEqualTo(Date value) {
            addCriterionForJDBCDate("DBIRTHDAY >=", value, "dbirthday");
            return (Criteria) this;
        }

        public Criteria andDbirthdayLessThan(Date value) {
            addCriterionForJDBCDate("DBIRTHDAY <", value, "dbirthday");
            return (Criteria) this;
        }

        public Criteria andDbirthdayLessThanOrEqualTo(Date value) {
            addCriterionForJDBCDate("DBIRTHDAY <=", value, "dbirthday");
            return (Criteria) this;
        }

        public Criteria andDbirthdayIn(List<Date> values) {
            addCriterionForJDBCDate("DBIRTHDAY in", values, "dbirthday");
            return (Criteria) this;
        }

        public Criteria andDbirthdayNotIn(List<Date> values) {
            addCriterionForJDBCDate("DBIRTHDAY not in", values, "dbirthday");
            return (Criteria) this;
        }

        public Criteria andDbirthdayBetween(Date value1, Date value2) {
            addCriterionForJDBCDate("DBIRTHDAY between", value1, value2, "dbirthday");
            return (Criteria) this;
        }

        public Criteria andDbirthdayNotBetween(Date value1, Date value2) {
            addCriterionForJDBCDate("DBIRTHDAY not between", value1, value2, "dbirthday");
            return (Criteria) this;
        }

        public Criteria andDjointimeIsNull() {
            addCriterion("DJOINTIME is null");
            return (Criteria) this;
        }

        public Criteria andDjointimeIsNotNull() {
            addCriterion("DJOINTIME is not null");
            return (Criteria) this;
        }

        public Criteria andDjointimeEqualTo(Date value) {
            addCriterionForJDBCDate("DJOINTIME =", value, "djointime");
            return (Criteria) this;
        }

        public Criteria andDjointimeNotEqualTo(Date value) {
            addCriterionForJDBCDate("DJOINTIME <>", value, "djointime");
            return (Criteria) this;
        }

        public Criteria andDjointimeGreaterThan(Date value) {
            addCriterionForJDBCDate("DJOINTIME >", value, "djointime");
            return (Criteria) this;
        }

        public Criteria andDjointimeGreaterThanOrEqualTo(Date value) {
            addCriterionForJDBCDate("DJOINTIME >=", value, "djointime");
            return (Criteria) this;
        }

        public Criteria andDjointimeLessThan(Date value) {
            addCriterionForJDBCDate("DJOINTIME <", value, "djointime");
            return (Criteria) this;
        }

        public Criteria andDjointimeLessThanOrEqualTo(Date value) {
            addCriterionForJDBCDate("DJOINTIME <=", value, "djointime");
            return (Criteria) this;
        }

        public Criteria andDjointimeIn(List<Date> values) {
            addCriterionForJDBCDate("DJOINTIME in", values, "djointime");
            return (Criteria) this;
        }

        public Criteria andDjointimeNotIn(List<Date> values) {
            addCriterionForJDBCDate("DJOINTIME not in", values, "djointime");
            return (Criteria) this;
        }

        public Criteria andDjointimeBetween(Date value1, Date value2) {
            addCriterionForJDBCDate("DJOINTIME between", value1, value2, "djointime");
            return (Criteria) this;
        }

        public Criteria andDjointimeNotBetween(Date value1, Date value2) {
            addCriterionForJDBCDate("DJOINTIME not between", value1, value2, "djointime");
            return (Criteria) this;
        }

        public Criteria andDdescIsNull() {
            addCriterion("DDESC is null");
            return (Criteria) this;
        }

        public Criteria andDdescIsNotNull() {
            addCriterion("DDESC is not null");
            return (Criteria) this;
        }

        public Criteria andDdescEqualTo(String value) {
            addCriterion("DDESC =", value, "ddesc");
            return (Criteria) this;
        }

        public Criteria andDdescNotEqualTo(String value) {
            addCriterion("DDESC <>", value, "ddesc");
            return (Criteria) this;
        }

        public Criteria andDdescGreaterThan(String value) {
            addCriterion("DDESC >", value, "ddesc");
            return (Criteria) this;
        }

        public Criteria andDdescGreaterThanOrEqualTo(String value) {
            addCriterion("DDESC >=", value, "ddesc");
            return (Criteria) this;
        }

        public Criteria andDdescLessThan(String value) {
            addCriterion("DDESC <", value, "ddesc");
            return (Criteria) this;
        }

        public Criteria andDdescLessThanOrEqualTo(String value) {
            addCriterion("DDESC <=", value, "ddesc");
            return (Criteria) this;
        }

        public Criteria andDdescLike(String value) {
            addCriterion("DDESC like", value, "ddesc");
            return (Criteria) this;
        }

        public Criteria andDdescNotLike(String value) {
            addCriterion("DDESC not like", value, "ddesc");
            return (Criteria) this;
        }

        public Criteria andDdescIn(List<String> values) {
            addCriterion("DDESC in", values, "ddesc");
            return (Criteria) this;
        }

        public Criteria andDdescNotIn(List<String> values) {
            addCriterion("DDESC not in", values, "ddesc");
            return (Criteria) this;
        }

        public Criteria andDdescBetween(String value1, String value2) {
            addCriterion("DDESC between", value1, value2, "ddesc");
            return (Criteria) this;
        }

        public Criteria andDdescNotBetween(String value1, String value2) {
            addCriterion("DDESC not between", value1, value2, "ddesc");
            return (Criteria) this;
        }

        public Criteria andDpriceIsNull() {
            addCriterion("DPRICE is null");
            return (Criteria) this;
        }

        public Criteria andDpriceIsNotNull() {
            addCriterion("DPRICE is not null");
            return (Criteria) this;
        }

        public Criteria andDpriceEqualTo(Integer value) {
            addCriterion("DPRICE =", value, "dprice");
            return (Criteria) this;
        }

        public Criteria andDpriceNotEqualTo(Integer value) {
            addCriterion("DPRICE <>", value, "dprice");
            return (Criteria) this;
        }

        public Criteria andDpriceGreaterThan(Integer value) {
            addCriterion("DPRICE >", value, "dprice");
            return (Criteria) this;
        }

        public Criteria andDpriceGreaterThanOrEqualTo(Integer value) {
            addCriterion("DPRICE >=", value, "dprice");
            return (Criteria) this;
        }

        public Criteria andDpriceLessThan(Integer value) {
            addCriterion("DPRICE <", value, "dprice");
            return (Criteria) this;
        }

        public Criteria andDpriceLessThanOrEqualTo(Integer value) {
            addCriterion("DPRICE <=", value, "dprice");
            return (Criteria) this;
        }

        public Criteria andDpriceIn(List<Integer> values) {
            addCriterion("DPRICE in", values, "dprice");
            return (Criteria) this;
        }

        public Criteria andDpriceNotIn(List<Integer> values) {
            addCriterion("DPRICE not in", values, "dprice");
            return (Criteria) this;
        }

        public Criteria andDpriceBetween(Integer value1, Integer value2) {
            addCriterion("DPRICE between", value1, value2, "dprice");
            return (Criteria) this;
        }

        public Criteria andDpriceNotBetween(Integer value1, Integer value2) {
            addCriterion("DPRICE not between", value1, value2, "dprice");
            return (Criteria) this;
        }

        public Criteria andDpwdIsNull() {
            addCriterion("DPWD is null");
            return (Criteria) this;
        }

        public Criteria andDpwdIsNotNull() {
            addCriterion("DPWD is not null");
            return (Criteria) this;
        }

        public Criteria andDpwdEqualTo(String value) {
            addCriterion("DPWD =", value, "dpwd");
            return (Criteria) this;
        }

        public Criteria andDpwdNotEqualTo(String value) {
            addCriterion("DPWD <>", value, "dpwd");
            return (Criteria) this;
        }

        public Criteria andDpwdGreaterThan(String value) {
            addCriterion("DPWD >", value, "dpwd");
            return (Criteria) this;
        }

        public Criteria andDpwdGreaterThanOrEqualTo(String value) {
            addCriterion("DPWD >=", value, "dpwd");
            return (Criteria) this;
        }

        public Criteria andDpwdLessThan(String value) {
            addCriterion("DPWD <", value, "dpwd");
            return (Criteria) this;
        }

        public Criteria andDpwdLessThanOrEqualTo(String value) {
            addCriterion("DPWD <=", value, "dpwd");
            return (Criteria) this;
        }

        public Criteria andDpwdLike(String value) {
            addCriterion("DPWD like", value, "dpwd");
            return (Criteria) this;
        }

        public Criteria andDpwdNotLike(String value) {
            addCriterion("DPWD not like", value, "dpwd");
            return (Criteria) this;
        }

        public Criteria andDpwdIn(List<String> values) {
            addCriterion("DPWD in", values, "dpwd");
            return (Criteria) this;
        }

        public Criteria andDpwdNotIn(List<String> values) {
            addCriterion("DPWD not in", values, "dpwd");
            return (Criteria) this;
        }

        public Criteria andDpwdBetween(String value1, String value2) {
            addCriterion("DPWD between", value1, value2, "dpwd");
            return (Criteria) this;
        }

        public Criteria andDpwdNotBetween(String value1, String value2) {
            addCriterion("DPWD not between", value1, value2, "dpwd");
            return (Criteria) this;
        }

        public Criteria andDpicIsNull() {
            addCriterion("DPIC is null");
            return (Criteria) this;
        }

        public Criteria andDpicIsNotNull() {
            addCriterion("DPIC is not null");
            return (Criteria) this;
        }

        public Criteria andDpicEqualTo(String value) {
            addCriterion("DPIC =", value, "dpic");
            return (Criteria) this;
        }

        public Criteria andDpicNotEqualTo(String value) {
            addCriterion("DPIC <>", value, "dpic");
            return (Criteria) this;
        }

        public Criteria andDpicGreaterThan(String value) {
            addCriterion("DPIC >", value, "dpic");
            return (Criteria) this;
        }

        public Criteria andDpicGreaterThanOrEqualTo(String value) {
            addCriterion("DPIC >=", value, "dpic");
            return (Criteria) this;
        }

        public Criteria andDpicLessThan(String value) {
            addCriterion("DPIC <", value, "dpic");
            return (Criteria) this;
        }

        public Criteria andDpicLessThanOrEqualTo(String value) {
            addCriterion("DPIC <=", value, "dpic");
            return (Criteria) this;
        }

        public Criteria andDpicLike(String value) {
            addCriterion("DPIC like", value, "dpic");
            return (Criteria) this;
        }

        public Criteria andDpicNotLike(String value) {
            addCriterion("DPIC not like", value, "dpic");
            return (Criteria) this;
        }

        public Criteria andDpicIn(List<String> values) {
            addCriterion("DPIC in", values, "dpic");
            return (Criteria) this;
        }

        public Criteria andDpicNotIn(List<String> values) {
            addCriterion("DPIC not in", values, "dpic");
            return (Criteria) this;
        }

        public Criteria andDpicBetween(String value1, String value2) {
            addCriterion("DPIC between", value1, value2, "dpic");
            return (Criteria) this;
        }

        public Criteria andDpicNotBetween(String value1, String value2) {
            addCriterion("DPIC not between", value1, value2, "dpic");
            return (Criteria) this;
        }
    }

    /**
     */
    public static class Criteria extends GeneratedCriteria {

        protected Criteria() {
            super();
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}